class Project implements Serializable{
  
  ProjectGroup group
  String projectCode
  Person supervisor
  Person student
  String projectName
  String description

  static hasMany = [report:Report]
 
  static constraints = {
    projectName(blank:false)
    group(nullable:false)
    projectCode(blank:false)
    description(maxSize:2000, blank:false)
    supervisor(nullable:false)
    student(nullable:true)
  }

  String toString(){
    return projectName
  }

		

	def getReports() {
		return Report.findAll("from Report as r where r.project=" + this.id)
	}

}
